package com.leizhou.user.service;

import com.leizhou.user.mapper.UserMapper;
import com.leizhou.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author LT
 * @version 1.0.0
 * @ClassName UserService.java
 * @Description TODO 用户业务层
 * @createTime 2020年04月23日 11:04:00
 */
@Service
@Transactional
public class UserService {

    @Autowired
    private UserMapper userMapper;

    /** 根据主键id查询用户 */
    public User findOne(Long id){
        return userMapper.selectByPrimaryKey(id);
    }
}